home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / paper / pap12.sty < prev    next >
Text File  |  1991-08-08  |  16KB  |  371 lines

  1. % PAPER DOCUMENT STYLE -- Released 22 Feb 90
  2. %    for LaTeX version 2.09
  3. % Copyright (C) 1990 by Don Hosek
  4.  
  5. %  ****************************************
  6. %  *               FONTS                  *
  7. %  ****************************************
  8. %
  9.  
  10. \lineskip 1pt            % \lineskip is 1pt for all font sizes.
  11. \normallineskip 1pt
  12. \def\baselinestretch{1}
  13.  
  14. % Each size-changing command \SIZE executes the command
  15. %        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
  16. % where:
  17. %   BASELINESKIP = Normal value of \baselineskip for that size.  (Actual 
  18. %                  value will be \baselinestretch * BASELINESKIP.)
  19. %
  20. %  \FONTSIZE     = Name of font-size command.  The currently available
  21. %                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
  22. %                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
  23. %                  \xivpt, \xviipt, \xxpt, \xxvpt.
  24. %  \@FONTSIZE    = The same as the font-size command except with an
  25. %                  '@' in front---e.g., if \FONTSIZE = \xivpt then
  26. %                  \@FONTSIZE = \@xivpt.
  27. %
  28. % For reasons of efficiency that needn't concern the designer,
  29. % the document style defines \@normalsize instead of \normalsize .  This is
  30. % done only for \normalsize, not for any other size-changing commands.
  31.  
  32. \def\@normalsize{\@setsize\normalsize{14.5pt}\xiipt\@xiipt
  33. \abovedisplayskip 12pt plus3pt minus7pt%
  34. \belowdisplayskip \abovedisplayskip
  35. \abovedisplayshortskip  \z@ plus3pt%   
  36. \belowdisplayshortskip  6.5pt plus3.5pt minus3pt%
  37. \let\@listi\@listI}   % Setting of \@listi added 9 Jun 87
  38.  
  39.  
  40. \def\small{\@setsize\small{13.6pt}\xipt\@xipt
  41. \abovedisplayskip 11pt plus3pt minus6pt%
  42. \belowdisplayskip \abovedisplayskip
  43. \abovedisplayshortskip  \z@ plus3pt%   
  44. \belowdisplayshortskip  6.5pt plus3.5pt minus3pt
  45. \def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
  46.  \parsep 4.5pt plus 2pt minus 1pt \itemsep \parsep
  47.             \topsep 9pt plus 3pt minus 5pt}}
  48.  
  49. \def\footnotesize{\@setsize\footnotesize{12pt}\xpt\@xpt
  50. \abovedisplayskip 10pt plus2pt minus5pt%
  51. \belowdisplayskip \abovedisplayskip
  52. \abovedisplayshortskip  \z@ plus3pt%   
  53. \belowdisplayshortskip  6pt plus3pt minus3pt
  54. \def\@listi{\leftmargin\leftmargini %% Added 22 Dec 87
  55. \topsep 6pt plus 2pt minus 2pt\parsep 3pt plus 2pt minus 1pt
  56. \itemsep \parsep}}
  57.  
  58. \def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
  59. \def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
  60. \def\large{\@setsize\large{18pt}\xivpt\@xivpt}
  61. \def\Large{\@setsize\Large{22pt}\xviipt\@xviipt}
  62. \def\LARGE{\@setsize\LARGE{25pt}\xxpt\@xxpt}
  63. \def\huge{\@setsize\huge{30pt}\xxvpt\@xxvpt}
  64. \let\Huge=\huge
  65.  
  66. \normalsize  % Choose the normalsize font.
  67.  
  68.  
  69. %  ****************************************
  70. %  *            PAGE LAYOUT               *
  71. %  ****************************************
  72. %
  73. % All margin dimensions measured from a point one inch from top and side
  74. % of page.  
  75.  
  76. % SIDE MARGINS:
  77. \if@twoside                 % Values for two-sided printing:
  78.    \oddsidemargin 0pt      %   Left margin on odd-numbered pages.
  79.    \evensidemargin 0pt     %   Left margin on even-numbered pages.
  80.    \marginparwidth 100pt    %   Width of marginal notes.
  81. \else                       % Values for one-sided printing:
  82.    \oddsidemargin 0pt      %   Note that \oddsidemargin = \evensidemargin
  83.    \evensidemargin 0pt
  84.    \marginparwidth 83pt 
  85. \fi
  86. \marginparsep 10pt          % Horizontal space between outer margin and 
  87.                             % marginal note
  88.  
  89.  
  90. % VERTICAL SPACING:        
  91.                          % Top of page:
  92. \topmargin 0pt           %    Nominal distance from top of page to top of
  93.                          %    box containing running head.
  94. \headheight 12pt         %    Height of box containing running head.
  95. \headsep 25pt            %    Space between running head and text.
  96. % \topskip = 10pt        %    '\baselineskip' for first line of page.
  97.                          % Bottom of page:
  98. \footskip 30pt           %    Distance from baseline of box containing foot 
  99.                          %    to baseline of last line of text.
  100.  
  101.  
  102. % DIMENSION OF TEXT:
  103. % 24 Jun 86: changed to explicitly compute \textheight to avoid roundoff.
  104. % The value of the multiplier was calculated as the floor of the
  105. % old \textheight minus \topskip, divided by \baselineskip for \normalsize.
  106. % The old value of \textheight was 536.5pt.
  107. % \textheight is the height of text (including footnotes and figures, 
  108. % excluding running head and foot).
  109.  
  110. \textheight = 8.1in
  111. \advance\textheight by \topskip
  112. \textwidth 6.5in         % Width of text line.
  113.                          % For two-column mode: 
  114. \columnsep 10pt          %    Space between columns 
  115. \columnseprule 0pt       %    Width of rule between columns.
  116.  
  117. % A \raggedbottom command causes 'ragged bottom' pages: pages set to
  118. % natural height instead of being stretched to exactly \textheight.
  119.  
  120. % FOOTNOTES:
  121.  
  122. \footnotesep 8.4pt    % Height of strut placed at the beginning of every
  123.                       % footnote = height of normal \footnotesize strut,
  124.                       % so no extra space between footnotes.
  125.  
  126. \skip\footins 10.8pt plus 4pt minus 2pt  % Space between last line of text and 
  127.                                          % top of first footnote.
  128.  
  129. % FLOATS: (a float is something like a figure or table)
  130. %
  131. %  FOR FLOATS ON A TEXT PAGE:
  132. %
  133. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  134. \floatsep 14pt plus 2pt minus 4pt        % Space between adjacent floats moved
  135.                                          % to top or bottom of text page.
  136. \textfloatsep 20pt plus 2pt minus 4pt    % Space between main text and floats
  137.                                          % at top or bottom of page.
  138. \intextsep 14pt plus 4pt minus 4pt       % Space between in-text figures and 
  139.                                          % text.
  140. \@maxsep 20pt                            % The maximum of \floatsep, 
  141.                                          % \textfloatsep and \intextsep (minus
  142.                                          % the stretch and shrink).
  143. %    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
  144. \dblfloatsep 14pt plus 2pt minus 4pt     % Same as \floatsep for double-column
  145.                                          % figures in two-column mode.
  146. \dbltextfloatsep 20pt plus 2pt minus 4pt % \textfloatsep for double-column 
  147.                                          % floats.
  148. \@dblmaxsep 20pt                         % The maximum of \dblfloatsep and 
  149.                                          % \dbltexfloatsep.
  150.  
  151. %  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
  152. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  153. \@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must be    
  154.                          % 0pt plus ...)                                    
  155. \@fpsep 10pt plus 2fil    % Space between floats on float page/column.       
  156. \@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must be 
  157.                          % 0pt plus ... )                                   
  158.  
  159. %   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
  160. \@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt plus ...)
  161. \@dblfpsep 10pt plus 2fil % Space between floats on float page.
  162. \@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be 
  163.                          % 0pt plus ... )                                   
  164. % MARGINAL NOTES:
  165. %
  166. \marginparpush 7pt       % Minimum vertical separation between two marginal 
  167.                          % notes.
  168.  
  169.  
  170. %  ****************************************
  171. %  *           PARAGRAPHING               *
  172. %  ****************************************
  173. %
  174. \parskip 0pt plus 1pt              % Extra vertical space between paragraphs.
  175. \parindent 1.5em                   % Width of paragraph indentation.
  176. %\topsep 10pt plus 4pt minus 6pt   % Extra vertical space, in addition to 
  177.                                    % \parskip, added above and below list and
  178.                                    % paragraphing environments.
  179. \partopsep 3pt plus 2pt minus 2pt  % Extra vertical space, in addition to 
  180.                                    % \parskip and \topsep, added when user
  181.                                    % leaves blank line before environment.
  182. %\itemsep 5pt plus 2.5pt minus 1pt % Extra vertical space, in addition to
  183.                                    % \parskip, added between list items.
  184. % See \@listI for values of \topsep and \itemsep
  185. % (Change made 9 Jun 87)
  186.  
  187. % The following page-breaking penalties are defined
  188.  
  189. \@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
  190. \@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
  191. \@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]
  192.  
  193. \@beginparpenalty -\@lowpenalty    % Before a list or paragraph environment.
  194. \@endparpenalty   -\@lowpenalty    % After a list or paragraph environment.
  195. \@itempenalty     -\@lowpenalty    % Between list items.
  196.  
  197. % \clubpenalty         % 'Club line'  at bottom of page.
  198. % \widowpenalty        % 'Widow line' at top of page.
  199. % \displaywidowpenalty % Math display widow line.
  200. % \predisplaypenalty   % Breaking before a math display.
  201. % \postdisplaypenalty  % Breaking after a math display.
  202. % \interlinepenalty    % Breaking at a line within a paragraph.
  203. % \brokenpenalty       % Breaking after a hyphenated line.
  204.  
  205.  
  206. %    ****************************************
  207. %    *             SECTIONS                 *
  208. %    ****************************************
  209. %
  210.  
  211. % \secdef{UNSTARCMDS}{STARCMDS} :
  212. %    When defining a sectionioning command without using
  213. %    \@startsection, you can use \secdef as follows:
  214. %       \def\part { ... \secdef \CMDA \CMDB }
  215. %       \def\CMDA  [#1]#2{ ... }     % Command to define \part[...]{...}
  216. %       \def\CMDB  #1{ ... }         % Command to define \part*{...}
  217.  
  218. \def\part{\par               % New paragraph
  219.    \addvspace{4ex}           % Adds vertical space above title.
  220.    \@afterindentfalse        % Suppresses indent in first paragraph.  Change
  221.    \secdef\@part\@spart}     % to \@afterindenttrue to have indent.
  222.  
  223. \def\@part[#1]#2{\ifnum \c@secnumdepth >\m@ne    % IF secnumdepth > -1
  224.         \refstepcounter{part}                    %  THEN step part counter
  225.         \addcontentsline{toc}{part}{\thepart     %       add toc line
  226.         \hspace{1em}#1}\else                     %  ELSE add unnumbered line
  227.       \addcontentsline{toc}{part}{#1}\fi         % FI
  228.    { \parindent 0pt \raggedright 
  229.     \ifnum \c@secnumdepth >\m@ne   % IF secnumdepth > -1 
  230.       \Large \sl Part \thepart     %   THEN Print 'Part' and 
  231.       \par\nobreak                 %          number in \Large slanted.
  232.     \fi                            % FI
  233.     \huge \bf                      % Select \huge boldface.
  234.     #2\markboth{}{}\par }          % Print title and set heading marks null.
  235.     \nobreak                       % TeX penalty to prevent page break.
  236.     \vskip 3ex                     % Space between title and text.
  237.    \@afterheading                  % Routine called after part and
  238.     }                              %     section heading.
  239.  
  240. % Heading for \part* command
  241. \def\@spart#1{{\parindent 0pt \raggedright 
  242.     \huge \sl                       
  243.     #1\par}                         % Title.
  244.     \nobreak                        % TeX penalty to prevent page break.
  245.     \vskip 3ex                      % Space between title and text.
  246.     \@afterheading                  % Routine called after part and
  247.   }                                 %     section heading.
  248.  
  249. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} 
  250. %            optional * [ALTHEADING]{HEADING}
  251. %    Generic command to start a section.  
  252. %    NAME       : e.g., 'subsection'
  253. %    LEVEL      : a number, denoting depth of section -- e.g., section=1,
  254. %                 subsection = 2, etc.  A section number will be printed if
  255. %                 and only if LEVEL < or = the value of the secnumdepth
  256. %                 counter.
  257. %    INDENT     : Indentation of heading from left margin
  258. %    BEFORESKIP : Absolute value = skip to leave above the heading.  
  259. %                 If negative, then paragraph indent of text following 
  260. %                 heading is suppressed.
  261. %    AFTERSKIP  : if positive, then skip to leave below heading,
  262. %                       else - skip to leave to right of run-in heading.
  263. %    STYLE      : commands to set style
  264. %  If '*' missing, then increments the counter.  If it is present, then
  265. %  there should be no [ALTHEADING] argument.  A sectioning command
  266. %  is normally defined to \@startsection + its first six arguments.
  267.  
  268. \def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus 
  269.     -.2ex}{2.3ex plus .2ex}{\large\sl}}
  270. \def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus 
  271.    -.2ex}{1.5ex plus .2ex}{\large\sl}}
  272. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus
  273.  -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\sl}}
  274. \def\paragraph{\@startsection
  275.      {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\sl}}
  276. \def\subparagraph{\@startsection
  277.      {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus 
  278.      .2ex}{-1em}{\normalsize\sl}}
  279.  
  280.  
  281. % Default initializations of \...mark commands.  (See below for their
  282. % us in defining page styles.
  283. %
  284.  
  285. % \def\sectionmark#1{}           % Preloaded definitions
  286. % \def\subsectionmark#1{}
  287. % \def\subsubsectionmark#1{}
  288. % \def\paragraphmark#1{}
  289. % \def\subparagraphmark#1{}
  290.  
  291. % The value of the counter secnumdepth gives the depth of the
  292. % highest-level sectioning command that is to produce section numbers.
  293. %
  294.  
  295. \setcounter{secnumdepth}{3}
  296.  
  297. % APPENDIX
  298. %
  299. % The \appendix command must do the following:
  300. %    -- reset the section and subsection counters to zero
  301. %    -- redefine the section counter to produce appendix numbers
  302. %    -- redefine the \section command if appendix titles and headings are
  303. %       to look different from section titles and headings.
  304.  
  305. \def\appendix{\par
  306.   \setcounter{section}{0}
  307.   \setcounter{subsection}{0}
  308.   \def\thesection{\Alph{section}}}
  309.  
  310.  
  311. %    ****************************************
  312. %    *                LISTS                 *
  313. %    ****************************************
  314. %
  315.  
  316. % The following commands are used to set the default values for the list
  317. % environment's parameters. See the LaTeX manual for an explanation of
  318. % the meanings of the parameters.  Defaults for the list environment are
  319. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  320. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  321. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  322. % called for a third-level list.)  By convention, \@listK should set
  323. % \leftmargin to \leftmarginK.
  324. %
  325. % For efficiency, level-one list's values are defined at top level, and
  326. % \@listi is defined to set only \leftmargin.
  327.  
  328. \leftmargini 2.5em
  329. \leftmarginii 2.2em     % > \labelsep + width of '(m)'
  330. \leftmarginiii 1.87em   % > \labelsep + width of 'vii.'
  331. \leftmarginiv 1.7em     % > \labelsep + width of 'M.'
  332. \leftmarginv 1em
  333. \leftmarginvi 1em
  334.  
  335. \leftmargin\leftmargini
  336. \labelsep .5em
  337. \labelwidth\leftmargini\advance\labelwidth-\labelsep
  338. %\parsep 5pt plus 2.5pt minus 1pt   %(Removed 9 Jun 87)
  339.  
  340. % \@listI defines top level and \@listi values of
  341. % \leftmargin, \topsep, \parsep, and \itemsep
  342. % (Added 9 Jun 87)
  343. \def\@listI{\leftmargin\leftmargini \parsep 5pt plus 2.5pt minus 1pt%
  344. \topsep 10pt plus 4pt minus 6pt%
  345. \itemsep 5pt plus 2.5pt minus 1pt}
  346.  
  347. \let\@listi\@listI
  348. \@listi 
  349.  
  350. \def\@listii{\leftmargin\leftmarginii
  351.    \labelwidth\leftmarginii\advance\labelwidth-\labelsep
  352.    \topsep 5pt plus 2.5pt minus 1pt
  353.    \parsep 2.5pt plus 1pt minus 1pt
  354.    \itemsep \parsep}
  355.  
  356. \def\@listiii{\leftmargin\leftmarginiii
  357.     \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
  358.     \topsep 2.5pt plus 1pt minus 1pt 
  359.     \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
  360.     \itemsep \topsep}
  361.  
  362. \def\@listiv{\leftmargin\leftmarginiv
  363.      \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
  364.  
  365. \def\@listv{\leftmargin\leftmarginv
  366.      \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
  367.  
  368. \def\@listvi{\leftmargin\leftmarginvi
  369.      \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
  370.  
  371.